{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import requests\n",
    "import pandas as pd\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Load patent and classification information"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def readTSV(fn):\n",
    "    return (pd.DataFrame(pd.read_csv(fn, sep='\\t')))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "asg_df = readTSV('company_patent_info.tsv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "pid          int64\n",
       "abstract    object\n",
       "date        object\n",
       "name        object\n",
       "dtype: object"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "asg_df.dtypes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#different classification information\n",
    "patent_cpc_df = readTSV('patent_cpc_samples.tsv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>pid</th>\n",
       "      <th>sector_title</th>\n",
       "      <th>field_title</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>7963585</td>\n",
       "      <td>Mechanical engineering</td>\n",
       "      <td>Transport</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       pid            sector_title field_title\n",
       "0  7963585  Mechanical engineering   Transport"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "patent_wipo_df[patent_wipo_df['pid'] == 7963585]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#get classes for each company\n",
    "total_df = asg_df.copy()\n",
    "total_df = total_df.drop(columns=['abstract', 'date'], axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "total_df = total_df.merge(patent_cpc_df, on='pid', how='inner')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "total_df = total_df.drop_duplicates()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "asg_cpc_cnt_df = total_df.groupby(['name', 'cpc']).count().reset_index()\n",
    "asg_cpc_cnt_df.columns = ['name', 'cpc', 'cnt']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>cpc</th>\n",
       "      <th>cnt</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Apple</td>\n",
       "      <td>A01F</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Apple</td>\n",
       "      <td>A01G</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Apple</td>\n",
       "      <td>A01K</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Apple</td>\n",
       "      <td>A01N</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Apple</td>\n",
       "      <td>A23C</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    name   cpc  cnt\n",
       "0  Apple  A01F    3\n",
       "1  Apple  A01G    2\n",
       "2  Apple  A01K   72\n",
       "3  Apple  A01N    1\n",
       "4  Apple  A23C    3"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "asg_cpc_cnt_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "cpc_cnt_matrix = asg_cpc_cnt_df.pivot('name', 'cpc', 'cnt')\n",
    "company_list = list(cpc_cnt_matrix.index)\n",
    "company_index = dict(zip(company_list,range(len(company_list))))\n",
    "cpc_cnt_matrix = np.nan_to_num(cpc_cnt_matrix)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtEAAAEu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7uJo7y16zVnH09OzpIcgd1mxfbHQxubvlSGZmZk4Ozvj6OhIZmZmoXInJ6ebtlWmTJmbvhiTkpL0grWSYmc9xc46ipv1FDvrFInbdXYlMdSvXaieYq3XnDWSkpJKeghSAm7ri4VXaty4MQkJCUDB2jEvLy9atGjBli1bzF/WMBqNWsohIiJ3X2h4wS4ke4A8Cn4uLV9QLiJihWKbiR49ejTjx49n1qxZuLu789xzz2Fra4uXlxe+vr4YjUZCQ0OLqzsREZFbd/nLk5ODCw6cqV+7YFu/0vClShG5I24ria5ZsyZr1qwBCk6fiomJKVInKCiIoKCg2+lGRETk9gX0VtIsIsWm2JZziIiIiIiUFkqiRUREREQspCRaRERERMRCSqJFRERERCykJFpERERExEJKokVERERELKQkWkRERETEQkqiRUREREQspCRaRERERMRCSqJFRERERCykJFpERERExEJKokVERERELKQkWkRERETEQkqiRUREREQspCRaRERERMRCSqJFRERERCykJFpERERExEJKokVERERELKQkWkRERETEQkqiRUREREQspCRaRERERMRCSqJFRERERCykJFpERERExEJKokVERERELKQkWkRERETEQkqiRUREREQsZHc3OjEajUycOJH9+/fj4OBAWFgYderUuRtdi4iIiIgUu7syE/3999+Tk5PD6tWreeedd4iMjLwb3YqIiIiI3BF3JYnevn07bdq0AaB58+bs3r37bnQrIiIiInJH3JUkOiMjA0dHR/NjW1tb8vLy7kbXIiIiIiLF7q6siXZ0dCQzM9P82Gg0Ymd3/a6zs7NJSkq6YZtZWVk3rSPXpthZT7GzjuJmPcXOOoqb9RQ7kVtzV5LoFi1asHnzZjp37szOnTtp0KDBDeuXKVMGT0/PG9ZJSkq6aR25NsXOeoqddRQ36yl21lHcrKfYWU5vOkqnu5JE//Of/yQ+Ph4/Pz9MJhMRERF3o1sRERERkTviriTRNjY2TJ48+W50JSIiIiJyx+mwFRERERERCymJFhERERGxkJJoERERERELKYkWEREREbGQkmgREREREQspiRYRERERsZCSaBERERERCymJFhERERGxkJJoERERERELKYkWEREREbGQkmgREREREQspiRYRERERsZCSaBERER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MOaNWtYs2YNH3zwAfv27WPjxo1ERESwdu1agoODMZvNZ80aNBMtIiIivzZrVsPMJNhTDr38oLu/fdMtt9wCwHXXXcf333/f7LDdu3dTUlJCeHg4ABaLhcOHDwNw00032ffr06cPANdff719DXG3bt1ITk7Gy8uLI0eOMGjQoBaHVlFRQa9evfD29gbg9ttvp7CwkAEDBlxQvyfH1bFjRwD69+/P/v37m203DAMAb29vpk2bxrRp0zCbzTz88MNn9NW3b197Tl999RXl5eVUV1cTGRkJQE1NDRUVFURFRbF06VKeeuopunXrRmBgIKNHj2b58uU888wzdOzYkUmTJp3R/8n3oWPHjvTq1QuAa665hvr6ejw9PamuriYmJgYvLy9qa2tpbGxk//79jB49GoC7774baJrV7tevHwBdunShrq7urOc6+Z7v3r2bw4cPExERAcCxY8coLy9nypQpZGRksHbtWvz9/Rk2bNhZswYni+ja2lpefPFFjh07xtVXX01KSgqdO3emuLiY5ORkTCYTwcHBREdHY7PZeOmllygtLcXDw4PZs2fTs2dPZ04rIiIi0ro1qyE2EibUwm+Brw7Bxp/az8LFxQWbzYa/vz933nkns2bNwmazkZ6eTo8ePez7nLr/6aZOncoHH3yAt7c38fHx9oL1ZN8n9ejRg7KyMmpra/Hy8mLbtm32At2RfltSVlZGTU0Nnp6e7NixgyeeeIJPP/2UqqoqAL755hsAjh49SklJCX/729+or69nyJAhPPLII2dkcqoePXpw/fXXs3LlStzd3Xnrrbfo27cvGzZs4LHHHiM+Pp6MjAzWrVuHv78/t912G9HR0WzcuJHXX3+duXPnttr/qQoKCqisrOS1116jurqaLVu2YBgGAQEB/Oc//6FPnz5s376djz76iKuuuqrVvlri7+9Pr169eP3113FxcSErK4vevXuTl5fHxIkTufbaa5k+fTpbtmzhscceO2s/ThXR69ato1+/fkRHR/PWW2+Rnp7O1KlTmTFjBmlpafj6+hIZGUlJSQmHDh2ioaGBvLw8iouLmTdvHkuWLHHmtCIiIiKtm5nUVED3++l1b6Crran99sEtHhIUFERkZCQ5OTls27aNsLAwamtr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hx8cyaNYvhw4crOxEnXHYz0aGhoYSGhra4LScnh7KyMp599lny8/Opqamxb6upqcHHx4e6urpm7TabrdkPp1+rs+VWWlpKTEwMkydP5o477sBsNiu307T2mTuVt7e3snPQ6Zkpm/Pj6vrz/MbJz1lLn7+OHTu2xfAuG5WVlTz33HOEhYXx0EMPkZKSYt+m3M5t/vz5xMbGMmbMGOrr6+3tyk7k/Fx2M9EtycjIID8/HwAvLy9MJhPe3t64u7tTXl6OYRgUFhYSFBTEoEGDKCgoAJr+CKx3795tOfQ2tXfvXp5//nlSU1MZMmQIgHK7AMrOccrGObfccguff/45AAUFBfbPWWFhITabjcOHD2Oz2a7oX6t///33PP3008TFxTF69GhAuZ2v/Px8MjIyALj66qtxcXHhd7/7nbITcVC7mBIaNWoU8fHxrF+/HqvVypw5cwB4+eWXiY2NxWq1EhwczIABA+jfvz9FRUWMHTsWwzDs+16JUlNTaWhoIDk5GWgqApcsWaLcLoCyc8z999+vbJwQHx/PtGnTePXVV/H392f48OGYTCaCgoJ44oknsNlsTJ8+va2H2aaWLl3K8ePHSU9PJz09HYCkpCRmz56t3M7hgQceYMqUKYwbNw6LxUJiYiIBAQH6zIk4yMUwDKOtByEiIiIi0p60i+UcIiIiIiKXExXRIiIiIiIOUhEtIiIiIuIgFdEiIiIiIg5SES0iIiIi4iAV0SIiIiIiDlIRLSIiIiLiIBXRIiIiIiIO+n/mYlflk/XTYwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 720x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.manifold import TSNE\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "%matplotlib inline\n",
    "import seaborn as sns\n",
    "sns.set_style('whitegrid')\n",
    "tsne = TSNE(n_components=2, random_state=0, n_iter=10000, perplexity=3)\n",
    "np.set_printoptions(suppress=True)\n",
    "result = tsne.fit_transform(cpc_cnt_matrix)\n",
    "labels = company_list\n",
    "\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.scatter(result[:, 0], result[:, 1], c='orange', edgecolors='r')\n",
    "for label, x, y in zip(labels, result[:, 0], result[:, 1]):\n",
    "    plt.annotate(label, xy=(x+1, y+1), xytext=(0, 0), textcoords='offset points')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#calculate similarity between companies based on t-SNE result\n",
    "from scipy.spatial import distance_matrix\n",
    "df = pd.DataFrame(result, columns=['x_cord', 'y_cord'], index=company_list)\n",
    "company_distance_tsne_df = pd.DataFrame(distance_matrix(df.values, df.values), index=df.index, columns=df.index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Apple</th>\n",
       "      <th>Bayerische motoren werke</th>\n",
       "      <th>Ericsson</th>\n",
       "      <th>Ford motor</th>\n",
       "      <th>Google</th>\n",
       "      <th>Huawei</th>\n",
       "      <th>Intel Corporation</th>\n",
       "      <th>International business machines</th>\n",
       "      <th>Nokia Corporation</th>\n",
       "      <th>PepsiCo, Inc.</th>\n",
       "      <th>Qualcomm</th>\n",
       "      <th>Shell Oil Company</th>\n",
       "      <th>The Coca-Cola Company</th>\n",
       "      <th>Toyota</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Apple</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>612.706116</td>\n",
       "      <td>417.788483</td>\n",
       "      <td>694.376526</td>\n",
       "      <td>56.605614</td>\n",
       "      <td>273.417297</td>\n",
       "      <td>126.233986</td>\n",
       "      <td>206.582672</td>\n",
       "      <td>327.730408</td>\n",
       "      <td>509.539642</td>\n",
       "      <td>234.933945</td>\n",
       "      <td>631.391968</td>\n",
       "      <td>578.070496</td>\n",
       "      <td>539.776550</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Bayerische motoren werke</th>\n",
       "      <td>612.706116</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>195.348541</td>\n",
       "      <td>82.086220</td>\n",
       "      <td>669.206970</td>\n",
       "      <td>352.359528</td>\n",
       "      <td>738.734558</td>\n",
       "      <td>819.143494</td>\n",
       "      <td>287.705322</td>\n",
       "      <td>138.637939</td>\n",
       "      <td>423.803131</td>\n",
       "      <td>194.494751</td>\n",
       "      <td>117.066010</td>\n",
       "      <td>80.128891</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Ericsson</th>\n",
       "      <td>417.788483</td>\n",
       "      <td>195.348541</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>277.355469</td>\n",
       "      <td>474.195740</td>\n",
       "      <td>168.616135</td>\n",
       "      <td>543.644592</td>\n",
       "      <td>624.042175</td>\n",
       "      <td>99.421280</td>\n",
       "      <td>112.260086</td>\n",
       "      <td>247.215576</td>\n",
       "      <td>259.210388</td>\n",
       "      <td>179.044998</td>\n",
       "      <td>122.936623</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Ford motor</th>\n",
       "      <td>694.376526</td>\n",
       "      <td>82.086220</td>\n",
       "      <td>277.355469</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>750.914185</td>\n",
       "      <td>431.709717</td>\n",
       "      <td>820.476929</td>\n",
       "      <td>900.884155</td>\n",
       "      <td>368.415100</td>\n",
       "      <td>213.118835</td>\n",
       "      <td>500.903320</td>\n",
       "      <td>223.426041</td>\n",
       "      <td>172.225647</td>\n",
       "      <td>160.489838</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Google</th>\n",
       "      <td>56.605614</td>\n",
       "      <td>669.206970</td>\n",
       "      <td>474.195740</td>\n",
       "      <td>750.914185</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>329.352325</td>\n",
       "      <td>69.628418</td>\n",
       "      <td>149.993027</td>\n",
       "      <td>384.321320</td>\n",
       "      <td>564.807434</td>\n",
       "      <td>286.997528</td>\n",
       "      <td>684.356506</td>\n",
       "      <td>633.048523</td>\n",
       "      <td>596.005432</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                               Apple  Bayerische motoren werke    Ericsson  \\\n",
       "Apple                       0.000000                612.706116  417.788483   \n",
       "Bayerische motoren werke  612.706116                  0.000000  195.348541   \n",
       "Ericsson                  417.788483                195.348541    0.000000   \n",
       "Ford motor                694.376526                 82.086220  277.355469   \n",
       "Google                     56.605614                669.206970  474.195740   \n",
       "\n",
       "                          Ford motor      Google      Huawei  \\\n",
       "Apple                     694.376526   56.605614  273.417297   \n",
       "Bayerische motoren werke   82.086220  669.206970  352.359528   \n",
       "Ericsson                  277.355469  474.195740  168.616135   \n",
       "Ford motor                  0.000000  750.914185  431.709717   \n",
       "Google                    750.914185    0.000000  329.352325   \n",
       "\n",
       "                          Intel Corporation  International business machines  \\\n",
       "Apple                            126.233986                       206.582672   \n",
       "Bayerische motoren werke         738.734558                       819.143494   \n",
       "Ericsson                         543.644592                       624.042175   \n",
       "Ford motor                       820.476929                       900.884155   \n",
       "Google                            69.628418                       149.993027   \n",
       "\n",
       "                          Nokia Corporation  PepsiCo, Inc.    Qualcomm  \\\n",
       "Apple                            327.730408     509.539642  234.933945   \n",
       "Bayerische motoren werke         287.705322     138.637939  423.803131   \n",
       "Ericsson                          99.421280     112.260086  247.215576   \n",
       "Ford motor                       368.415100     213.118835  500.903320   \n",
       "Google                           384.321320     564.807434  286.997528   \n",
       "\n",
       "                          Shell Oil Company  The Coca-Cola Company      Toyota  \n",
       "Apple                            631.391968             578.070496  539.776550  \n",
       "Bayerische motoren werke         194.494751             117.066010   80.128891  \n",
       "Ericsson                         259.210388             179.044998  122.936623  \n",
       "Ford motor                       223.426041             172.225647  160.489838  \n",
       "Google                           684.356506             633.048523  596.005432  "
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "company_distance_tsne_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "#use network property to calculate the similarity between companies\n",
    "def calculateSoftSimilarity(n1_set, n2_set, n1_dict, n2_dict, g):\n",
    "    unionSet = n1_set.union(n2_set)\n",
    "    n1_vector = [None] * len(unionSet)\n",
    "    n2_vector = [None] * len(unionSet)\n",
    "    idx = 0\n",
    "    for item in unionSet:\n",
    "        if (item in n1_set):\n",
    "            n1_vector[idx] = n1_dict[item]\n",
    "        else:\n",
    "            n1_vector[idx] = 0\n",
    "        if (item in n2_set):\n",
    "            n2_vector[idx] = n2_dict[item]\n",
    "        else:\n",
    "            n2_vector[idx] = 0\n",
    "        idx += 1\n",
    "    denominator = 0\n",
    "    base_a = 0\n",
    "    base_b = 0\n",
    "    nodes_list = list(unionSet)\n",
    "    for i in range(len(unionSet)):\n",
    "        i_node = nodes_list[i]\n",
    "        a_i = n1_vector[i]\n",
    "        b_i = n2_vector[i]\n",
    "        for j in range(len(unionSet)):\n",
    "            j_node = nodes_list[j]\n",
    "            a_j = n1_vector[j]   \n",
    "            b_j = n2_vector[j]            \n",
    "            if (g.has_edge(i_node, j_node)):\n",
    "                s = g[i_node][j_node]['weight']\n",
    "                denominator += a_i * b_j * s\n",
    "                base_a += a_i * a_j * s\n",
    "                base_b += b_i * b_j * s\n",
    "            else:\n",
    "                if (i == j):\n",
    "                    denominator += a_i * b_j\n",
    "                    base_a += a_i * a_j\n",
    "                    base_b += b_i * b_j\n",
    "    weight = denominator / math.sqrt(base_a * base_b)\n",
    "    return weight"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "cpc_cnt_matrix_df = asg_cpc_cnt_df.pivot('name', 'cpc', 'cnt')\n",
    "cpc_cnt_matrix_df = cpc_cnt_matrix_df.fillna(0)\n",
    "asg_dict_cnt = cpc_cnt_matrix_df.to_dict(orient='index')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {},
   "outputs": [],
   "source": [
    "#remove classes with count = 0\n",
    "remove_list =  ['Y10S', 'Y10T', 'Y04S', 'Y02A', 'Y02B', 'Y02C','Y02D','Y02E','Y02P','Y02T','Y02W','D10B','F05B','F05C','F05D', 'G16H']\n",
    "def getSet(dict_set):\n",
    "#     print (dict_set)\n",
    "#     print (\"===\")\n",
    "    cleaned_set = set()\n",
    "    for key, value in dict_set.items():\n",
    "        #print (value)\n",
    "        if ((value != 0.0) and (key not in remove_list)):\n",
    "            cleaned_set.add(key)\n",
    "    return cleaned_set"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {},
   "outputs": [],
   "source": [
    "import networkx as nx\n",
    "import math\n",
    "row_list = []\n",
    "g = nx.read_weighted_edgelist('./co_reference_network_cpc4_1976_2016.txt')\n",
    "for i in range(len(company_list)):\n",
    "    cls1_set = asg_dict_cnt[company_list[i]]\n",
    "    for j in range(i+1, len(company_list)):\n",
    "        cls2_set = asg_dict_cnt[company_list[j]]\n",
    "        w = calculateSoftSimilarity(getSet(cls1_set), getSet(cls2_set), cls1_set, cls2_set, g)\n",
    "        row_list.append({\"weight\": w, \"asg_A\": company_list[i], \"asg_B\": company_list[j]})\n",
    "company_cosine_similarity_df = pd.DataFrame(row_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>weight</th>\n",
       "      <th>asg_A</th>\n",
       "      <th>asg_B</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.314492</td>\n",
       "      <td>Apple</td>\n",
       "      <td>Bayerische motoren werke</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.747113</td>\n",
       "      <td>Apple</td>\n",
       "      <td>Ericsson</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.270769</td>\n",
       "      <td>Apple</td>\n",
       "      <td>Ford motor</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.973257</td>\n",
       "      <td>Apple</td>\n",
       "      <td>Google</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.780113</td>\n",
       "      <td>Apple</td>\n",
       "      <td>Huawei</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>86</th>\n",
       "      <td>0.130758</td>\n",
       "      <td>Qualcomm</td>\n",
       "      <td>The Coca-Cola Company</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>87</th>\n",
       "      <td>0.264259</td>\n",
       "      <td>Qualcomm</td>\n",
       "      <td>Toyota</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>88</th>\n",
       "      <td>0.229644</td>\n",
       "      <td>Shell Oil Company</td>\n",
       "      <td>The Coca-Cola Company</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>89</th>\n",
       "      <td>0.219306</td>\n",
       "      <td>Shell Oil Company</td>\n",
       "      <td>Toyota</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>90</th>\n",
       "      <td>0.258646</td>\n",
       "      <td>The Coca-Cola Company</td>\n",
       "      <td>Toyota</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>91 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      weight                  asg_A                     asg_B\n",
       "0   0.314492                  Apple  Bayerische motoren werke\n",
       "1   0.747113                  Apple                  Ericsson\n",
       "2   0.270769                  Apple                Ford motor\n",
       "3   0.973257                  Apple                    Google\n",
       "4   0.780113                  Apple                    Huawei\n",
       "..       ...                    ...                       ...\n",
       "86  0.130758               Qualcomm     The Coca-Cola Company\n",
       "87  0.264259               Qualcomm                    Toyota\n",
       "88  0.229644      Shell Oil Company     The Coca-Cola Company\n",
       "89  0.219306      Shell Oil Company                    Toyota\n",
       "90  0.258646  The Coca-Cola Company                    Toyota\n",
       "\n",
       "[91 rows x 3 columns]"
      ]
     },
     "execution_count": 114,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "company_cosine_similarity_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {},
   "outputs": [],
   "source": [
    "row_list = []\n",
    "for i in range(len(company_list)):\n",
    "    for j in range(i+1, len(company_list)):\n",
    "        row_list.append({\"tsne_w\": company_distance_tsne_df[company_list[i]][company_list[j]],\n",
    "                        \"asg_A\": company_list[i],\n",
    "                        \"asg_B\": company_list[j]})\n",
    "company_tsne_df = pd.DataFrame(row_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "metadata": {},
   "outputs": [],
   "source": [
    "comp_df = company_tsne_df.merge(company_cosine_similarity_df, on=['asg_A', 'asg_B'], how='inner')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {},
   "outputs": [],
   "source": [
    "comp_df['tsne_w'] = comp_df['tsne_w'].apply(lambda x: 1/(1+x))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>tsne_w</th>\n",
       "      <th>asg_A</th>\n",
       "      <th>asg_B</th>\n",
       "      <th>weight</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>0.001109</td>\n",
       "      <td>Ford motor</td>\n",
       "      <td>International business machines</td>\n",
       "      <td>0.255786</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73</th>\n",
       "      <td>0.001206</td>\n",
       "      <td>International business machines</td>\n",
       "      <td>Shell Oil Company</td>\n",
       "      <td>0.082540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>0.001217</td>\n",
       "      <td>Ford motor</td>\n",
       "      <td>Intel Corporation</td>\n",
       "      <td>0.258142</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>0.001219</td>\n",
       "      <td>Bayerische motoren werke</td>\n",
       "      <td>International business machines</td>\n",
       "      <td>0.270158</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>74</th>\n",
       "      <td>0.001279</td>\n",
       "      <td>International business machines</td>\n",
       "      <td>The Coca-Cola Company</td>\n",
       "      <td>0.174131</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>0.014159</td>\n",
       "      <td>Google</td>\n",
       "      <td>Intel Corporation</td>\n",
       "      <td>0.932077</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>83</th>\n",
       "      <td>0.014167</td>\n",
       "      <td>PepsiCo, Inc.</td>\n",
       "      <td>The Coca-Cola Company</td>\n",
       "      <td>0.922040</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57</th>\n",
       "      <td>0.014200</td>\n",
       "      <td>Huawei</td>\n",
       "      <td>Nokia Corporation</td>\n",
       "      <td>0.983046</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>84</th>\n",
       "      <td>0.015319</td>\n",
       "      <td>PepsiCo, Inc.</td>\n",
       "      <td>Toyota</td>\n",
       "      <td>0.289434</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.017359</td>\n",
       "      <td>Apple</td>\n",
       "      <td>Google</td>\n",
       "      <td>0.973257</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>91 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      tsne_w                            asg_A  \\\n",
       "39  0.001109                       Ford motor   \n",
       "73  0.001206  International business machines   \n",
       "38  0.001217                       Ford motor   \n",
       "18  0.001219         Bayerische motoren werke   \n",
       "74  0.001279  International business machines   \n",
       "..       ...                              ...   \n",
       "47  0.014159                           Google   \n",
       "83  0.014167                    PepsiCo, Inc.   \n",
       "57  0.014200                           Huawei   \n",
       "84  0.015319                    PepsiCo, Inc.   \n",
       "3   0.017359                            Apple   \n",
       "\n",
       "                              asg_B    weight  \n",
       "39  International business machines  0.255786  \n",
       "73                Shell Oil Company  0.082540  \n",
       "38                Intel Corporation  0.258142  \n",
       "18  International business machines  0.270158  \n",
       "74            The Coca-Cola Company  0.174131  \n",
       "..                              ...       ...  \n",
       "47                Intel Corporation  0.932077  \n",
       "83            The Coca-Cola Company  0.922040  \n",
       "57                Nokia Corporation  0.983046  \n",
       "84                           Toyota  0.289434  \n",
       "3                            Google  0.973257  \n",
       "\n",
       "[91 rows x 4 columns]"
      ]
     },
     "execution_count": 101,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "comp_df.sort_values(by=['tsne_w'], axis = 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>tsne_w</th>\n",
       "      <th>weight</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>tsne_w</th>\n",
       "      <td>1.00000</td>\n",
       "      <td>0.43691</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>weight</th>\n",
       "      <td>0.43691</td>\n",
       "      <td>1.00000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         tsne_w   weight\n",
       "tsne_w  1.00000  0.43691\n",
       "weight  0.43691  1.00000"
      ]
     },
     "execution_count": 102,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "comp_df.corr()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In the comparison, the correlation between these two methods is not high. It might be that cosine similarity works better when there are many features (i.e., higher dimension). In this case, it would not suggest to use cosine similiarity or soft cosine similarity to compare the technology portfolio of companies directly, because this measure does not consider magnitude of vectors. The cosine similarity is more like a \"direction\" measure rather than a magnitude measure. "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:py3-tf2]",
   "language": "python",
   "name": "conda-env-py3-tf2-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
